package com.xzq.wanandroid.ui.fragment;

import androidx.annotation.NonNull;

import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
import com.xzq.wanandroid.R;
import com.xzq.wanandroid.base.fragment.BaseFragment;
import com.xzq.wanandroid.base.presenter.BasePresenter;
import com.xzq.wanandroid.base.utils.Constant;
import com.xzq.wanandroid.bean.db.Article;
import com.xzq.wanandroid.bean.db.Banner;
import com.xzq.wanandroid.contract.home.HomeContract;
import com.xzq.wanandroid.presenter.home.HomePresenter;

import java.util.List;

/**
 * @ClassName : HomeFragment
 * @Description : 首页的Fragment
 * @Author : xzq
 * @Date: 2021-05-10 15:18
 * @Version :
 */
public class HomeFragment extends BaseFragment<HomeContract.IHomeView, HomePresenter> implements HomeContract.IHomeView
, OnLoadMoreListener, OnRefreshListener
{
    private static volatile HomeFragment mInstance=null;
    /**
     * 创建一个getInstance的方法获取HomeFragment的实例
     * 采用DCl
     */
    public static HomeFragment getInstance(){
        if (mInstance==null){
         synchronized (HomeFragment.class){
            if (mInstance==null){
                mInstance=new HomeFragment();
            }
         }
        }
        return mInstance;
    }

    @Override
    protected void initView() {


    }

    @Override
    protected HomePresenter createPresenter() {
        return null;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.home_fragment;
    }

    @Override
    public void onLoadMore(@NonNull @org.jetbrains.annotations.NotNull RefreshLayout refreshLayout) {

    }

    @Override
    public void onRefresh(@NonNull @org.jetbrains.annotations.NotNull RefreshLayout refreshLayout) {

    }

    @Override
    public void loadBanner(List<Banner> bannerList) {

    }

    @Override
    public void refreshBanner(List<Banner> bannerList) {

    }

    @Override
    public void loadArticle(List<Article> articleList) {

    }

    @Override
    public void refreshArticle(List<Article> articleList) {

    }

    @Override
    public void onLoading() {

    }

    @Override
    public void onLoadSuccess() {

    }

    @Override
    public void onLoadFailed() {

    }
}


